import request from '@/config/axios'
/**
 * 分页查询计划
 */
export const query = (params) => {
  return request.get({ url: '/restaurant/plan/query', params })
}

/**
 * 新建计划
 */
export const create = (data) => {
  return request.post({ url: '/restaurant/plan/create', data })
}

/**
 * 更新计划
 */
export const update = (data) => {
  return request.put({ url: '/restaurant/plan/update', data })
}

/**
 * 删除计划
 */
export const deleted = (id) => {
  return request.delete({ url: '/restaurant/plan/deleted?id=' + id })
}

/**
 * 更新计划状态
 */
export const updateStatus = (data) => {
  return request.post({ url: '/restaurant/plan/update-status', data })
}

/**
 * 获取单个餐饮计划
 */
export const get = (id) => {
  return request.get({ url: '/restaurant/plan/get?id=' + id })
}
